// 用来管理所有的请求接口

import service from "./request";
 
//登录接口
export const Login = (data)=>{
   return service({
    method:'post',
    url:'/login',
    data
   })
} 
//
export const GetMenus = (data)=>{
    return service({
     method:'get',
     url:'/menus',
    })
 } 
//
 export const GetUser = (params)=>{
    return service({
     method:'get',
     url:'/users',
     params
    })
 }
//添加接口
 export const AddUser = (data)=>{
   return service({
    method:'post',
    url:'/users',
    data
   })
}
//
export const GetOenUser = (params)=>{
   return service({
    method:'get',
    url:'/users/'+params,
   })
}
//修改用户
export const EditUser = (data)=>{
   return service({
    method:'put',
    url:'/users/' + data.id,
    data
   })
}
// 删除用户
export const DelOneUser = (data)=>{
   return service({
    method:'delete',
    url:'/users/' + data,
    data
   })
}